package com.tywj.panda.travel.details

import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.tywj.panda.customer.common.view.base.MyBaseActivity
import com.tywj.panda.travel.R
import com.tywj.panda.travel.route.TravelRoute
import com.tywj.lib.core.common.extension.onClick
import com.tywj.lib.route.RouteParam
import kotlinx.android.synthetic.main.travel_activity_details.tvLineBusName
import kotlinx.android.synthetic.main.travel_activity_ticket_transfer.*

/**
 * @desc 车票转让界面
 * @author June Yang
 * @date 2020/6/2
 */

@Route(path = TravelRoute.TRAVEL_TICKETS_TRANSFER)
class TravelTicketTransFerActivity : MyBaseActivity() {

    companion object {
        const val PARAMS_ID = "id"
    }

    private var id = ""

    override fun getLayoutID(): Int = R.layout.travel_activity_ticket_transfer

    override fun initVariable(savedInstanceState: Bundle?) {
        super.initVariable(savedInstanceState)

        val routeParam = RouteParam(this)

        id = routeParam.getString(PARAMS_ID)
    }

    override fun initListener() {
        super.initListener()

        btnConfirm.onClick {
            shortToast("转让成功")
        }
    }

    override fun loadDataOnCreate() {
        super.loadDataOnCreate()

        fakeData()
    }

    private fun fakeData() {
        tvLineBusName.text = "胖哒通勤车0001号列车"
        tvStart.text = "天府一街站"
        tvEnd.text = "天府二街站"
    }
}